package cglib;

import net.sf.cglib.proxy.Enhancer;

/**
 * @Author:zimmor
 * @Date: 2021/3/25 12:57
 * @Description
 * @version: 1.0.0
 */

public class DynamicProxyDemo2 {
    public static void main(String[] args) {
        Enhancer enhancer = new Enhancer();
        Buyer proxy =(Buyer)enhancer.create(Buyer.class, new CglibMethodInterceptor());
        System.out.println("proxy.buybuybuy() = " + proxy.buybuybuy());
        proxy.buyAK("AK74");
    }
}
